import request from '@/utils/request'

// 新增规格分类
export function PostSpec(data) {
    return request({
        url: '/logic/spec',
        method: 'post',
        data: data
    })
}

// 修改规格分类
export function PutSpec(data) {
    return request({
        url: '/logic/spec',
        method: 'put',
        data: data
    })
}

// 导出规格分类列表
export function SpecExport(query) {
    return request({
        url: '/logic/spec/export',
        method: 'get',
        params: query
    })
}

// 查询规格分类列表
export function SpecList(query) {
    return request({
        url: '/logic/spec/list',
        method: 'get',
        params: query
    })
}

// 删除规格分类
export function DelectSpec(ids) {
    return request({
        url: 'logic/spec/' + ids,
        method: 'DELETE',
    })
}


// 获取规格分类详细信息
export function SpecId(id) {
    return request({
        url: '/logic/spec/' + id,
        method: 'get',
    })
}

// 查询规格分类树
export function specTreeselect() {
    return request({
        url: '/specTreeselect',
        method: 'get',
    })
}

// 查询规格分类列表(排除节点)
export function exclude(id) {
    return request({
        url: '/spec/list/exclude/' + id,
        method: 'get',
    })
}




// 新增规格详情
export function PostDetail(data) {
    return request({
        url: '/logic/detail',
        method: 'post',
        data: data
    })
}

// 修改规格详情
export function PutDetail(data) {
    return request({
        url: '/logic/detail',
        method: 'put',
        data: data
    })
}

// 导出规格详情列表
export function DetailExport(query) {
    return request({
        url: '/logic/detail/export',
        method: 'get',
        params: query
    })
}

// 查询规格详情列表
export function DetailList(query) {
    return request({
        url: '/spec/group/list',
        method: 'get',
        params: query
    })
}

// 删除规格详情
export function DelectDetail(id) {
    return request({
        url: '/spec/group/' + id,
        method: 'DELETE',
    })
}


// 获取规格详细信息
export function DetailId(id) {
    return request({
        url: '/spec/group/' + id,
        method: 'get',
    })
}
